package com.thinkcube.edutainment.domain.data;

import java.util.ArrayList;
import java.util.List;

import android.os.Parcel;
import android.os.Parcelable;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;

@JsonIgnoreProperties(ignoreUnknown = true)
public class CourseCategoryData implements Parcelable {
	
	@JsonProperty("category_id")
	String categoryaId;
	@JsonProperty("category_name")
	String categoryName;
	@JsonProperty("category_description")
	String categoryDescription;
	@JsonProperty("sub_categories")
	List<CourseSubCategoryData> subCategoryData;

	CourseCategoryData() {

	}

	public String getCategoryaId() {
		return categoryaId;
	}

	public void setCategoryaId(String categoryaId) {
		this.categoryaId = categoryaId;
	}

	public String getCategoryName() {
		return categoryName;
	}

	public void setCategoryName(String categoryName) {
		this.categoryName = categoryName;
	}

	public String getCategoryDescription() {
		return categoryDescription;
	}

	public void setCategoryDescription(String categoryDescription) {
		this.categoryDescription = categoryDescription;
	}

	public List<CourseSubCategoryData> getSubCategoryData() {
		return subCategoryData;
	}

	public void setSubCategoryData(List<CourseSubCategoryData> subCategoryData) {
		this.subCategoryData = subCategoryData;
	}

	protected CourseCategoryData(Parcel in) {
		categoryaId = in.readString();
		categoryName = in.readString();
		categoryDescription = in.readString();
		subCategoryData = new ArrayList<CourseSubCategoryData>();
		in.readList(subCategoryData, null);
	}

	public int describeContents() {
		return 0;
	}

	public void writeToParcel(Parcel dest, int flags) {
		dest.writeString(categoryaId);
		dest.writeString(categoryName);
		dest.writeString(categoryDescription);
		dest.writeList(subCategoryData);
	}

	public static final Parcelable.Creator<CourseCategoryData> CREATOR = new Parcelable.Creator<CourseCategoryData>() {
		public CourseCategoryData createFromParcel(Parcel in) {
			return new CourseCategoryData(in);
		}

		public CourseCategoryData[] newArray(int size) {
			return new CourseCategoryData[size];
		}
	};
}
